home *** CD-ROM | disk | FTP | other *** search
- /*
- File: FontDBase.h
-
- Contains: QuickDraw GX to PostScript conversion code.
- File contains data structures and definitions for the font database.
-
- Version: Technology: Quickdraw GX 1.1.x
-
- Copyright: © 1994-1997 by Apple Computer, Inc., all rights reserved.
- */
-
- #ifndef __FONTDBASEHANDLER__
- #define __FONTDBASEHANDLER__
-
- #include <GXTypes.h>
- #include <GXFonts.h>
- #include "GXPrintingUniverse.h"
-
- enum {
- fdbNoFontFlags = 0x00000000,
- fdbUseMac8Bit = 0x00000001, /* Indicates that the Mac 8 bit standard encoding should be used for PostScript.*/
- fdbExcludeFontPrereqs = 0x00000002 /* Indicates that a font's prerequisits should be excluded from prerequisite list.*/
- };
- typedef long TfdbInfoFlags;
- /** Flags may be set by the FontDatabase handler, also may be set by client **/
-
- struct fontSfntMap {
- gxFont fontID;
- long newSfntRsrcID;
- };
- typedef struct fontSfntMap fontSfntMap;
-
-
- /******************* Prototypes ************************/
-
- typedef struct privateFontDatabaseCookie* TFontDbase;
-
- // Used to build database by client.
- OSErr FontDbaseInit(TFontDbase *fontDbase, gxSpoolFile* theFile);
- OSErr FontDbaseShutdown(TFontDbase fontDbase, gxSpoolFile* theFile);
- OSErr FontDbaseAddPage(TFontDbase fontDbase, gxShape thePage, Boolean useMac8bitEncoding);
-
- // Internally used by rest of imaging system.
- OSErr FontDbaseAddItem(TFontDbase fontDbase, gxFlatFontListItem *item, Boolean useMac8bitEncoding);
- OSErr FontDbaseCountFonts(TFontDbase fontDbase, long *numFonts);
- OSErr FontDbaseGetIndexedFont(TFontDbase fontDbase, long index, gxFont *fontID);
- OSErr FontDbaseLock(TFontDbase fontDbase);
- OSErr FontDbaseUnlock(TFontDbase fontDbase);
-
- OSErr FontDbaseGetGlyphBits(
- TFontDbase fontDbase, gxFont fontID, long snapshot,
- unsigned long* *glyphBits, gxFontVariation* *variations);
-
- OSErr FontDbaseSpoolFonts(TFontDbase fontDbase, gxSpoolFile* theFile, Boolean justAppFonts, Handle hExclusionList);
-
- OSErr FontDbaseSetFontFlags(TFontDbase fontDbase, gxFont fontID, TfdbInfoFlags flags);
-
- OSErr FontDbaseGetFontInfo(
- TFontDbase fontDbase, gxFont fontID, long *glyphCount,
- long *axisCount, long *variationCount, TfdbInfoFlags *flags);
-
- OSErr FontDbaseBuildPrerequisiteList(
- TFontDbase fontDbase, scalerStreamTypeFlag streamTypes,
- char *productDescription, Boolean useMessages, long *count);
-
- OSErr FontDbaseGetIndexedPrerequisite(
- TFontDbase fontDbase, long idx, long *size, gxFont *theFont,
- scalerPrerequisiteItem *item);
-
- OSErr FontDbaseExcludePrerequisite(TFontDbase fontDbase, gxFont theFont, Boolean exclude);
-
- OSErr FontDbaseAddStyleEntry(
- TFontDbase fontDbase, gxStyle theStyle, long numGlyphs,
- unsigned short glyphs[], Boolean use8BitMacEncoding);
-
- OSErr FontDbaseUnion(TFontDbase source, TFontDbase target);
-
- OSErr FDBListOfReferencedFONDs( long fontCount, const fontSfntMap fontList[], long* FONDCount, Handle* FONDListPtr);
-
- OSErr FDBAddFONDsToResourceFile(long FONDCount, Handle FONDList, gxSpoolFile theFile, Boolean useMessages);
-
-
- #endif
-